Show Case


Image Filters

Introduction

This was one of the first projects that I did, this is through the CS50 course. I only did the implementation of the filters which include, edge detection, grayscale, reflect, blur. There is a part of the program I will not be showing the reason being because it was given to me, that part of the code read in the image as an objects so I could then read through the rows of pixels. To see my implimentation of memory allocation and object creation in the C language take a look at Generation Generator project.

Filters

The filters are blur, edge detection, grayscale, reflect.

Grayscale

This was a very simple solution and I am happy with how it looks.

Yard Picture
Before Filter
Yard Grayscale Picture
After Filter

The grayscale function, just a single function for this one.

Grayscale Main
Main Function

Here I simply looped through all of the pixels, added up the rgb values and divided by three. This gave me the average (int avg) color value in that pixel which was then applied to all three colors. This will always be some shade of gray.

Summary

Not much to say about this one, its clear, its simple, its functional.